<?php
namespace Model;
require_once __DIR__."/../Lib/mydb.php";
require_once __DIR__."/../Utils/Contains.php";
require_once __DIR__."/../Utils/RongUtils.php";
use Lib\mydb;
use Utils\RongUtils;
use Model;
use Utils\Contains;
class Tip{
    private static $db=null;
    public $id;
    public $content;
    public $tel;
    function __construct($array) {
        $this->id=$array['id'];
        $this->content=$array['content'];
        $this->tel=$array['tel'];
        if(self::$db==null)
            self::$db =new mydb();
       
    }
    public function insert(){
         $sql="insert into Tip(id,content,tel) values('".$this->id."','".$this->content."','".$this->tel."');";
        if(self::$db->exec($sql))
            return 1;
        else
            return 0;
    }
}